import { resolve } from "path";
import { defineStore } from "pinia";
import { getInsureCompanyList } from 'api/insure/longTerm.ts';
export const useStore = defineStore("dictionary", {
    state: () => {
        return {
            longTermInsureCompanyList: []
        };
    },
    getters: {},
    actions: {
        getLongTermInsureCompanyList() {
            return new Promise(async (resolve, reject) => {
                if (this.longTermInsureCompanyList.length) {
                    resolve(this.longTermInsureCompanyList)
                }
                const data = await getInsureCompanyList({
                    type: 2,
                    pageSize: 100
                })
                this.longTermInsureCompanyList = data.rows
                resolve(this.longTermInsureCompanyList)
            })
        }
    },
});
